package com.yayan.beautyclub.dao;

import com.yayan.beautyclub.bean.Admin;

public interface IAdminDao {

	/**
	 * 获取管理员账户信息
	 * @param name
	 * @param pwd
	 * @return
	 * @throws Exception
	 */
	Admin getAdmin(String name, String pwd) throws Exception;
	
	/**
	 * 添加管理员账户
	 * @param admin
	 * @return
	 * @throws Exception
	 */
	int save(Admin admin) throws Exception;
	
	/**
	 * 更新管理员用户信息
	 * @param admin
	 * @return
	 * @throws Exception
	 */
	boolean update(Admin admin) throws Exception;
	
	/**
	 * 删除管理员账户
	 * @param name
	 * @return
	 * @throws Exception
	 */
	boolean delete(String name) throws Exception;
	
	/**
	 * 更新密码
	 * @param name
	 * @param pwd
	 * @return
	 * @throws Exception
	 */
	boolean setPwd(String name, String pwd) throws Exception;
	
	/**
	 * 更改权限
	 * @param name
	 * @param authority
	 * @return
	 * @throws Exception
	 */
	boolean setAuthority(String name, int authority) throws Exception;
}
